<?php
//---------------------------------------------------------------------------------------------------------------------------
    require_once('../../../config.inc.php');
    //---------------------------------------------------------------------------------------------------
    include_once($config['app_dir'] . '/includes/column.class.php');
    include_once($config['app_dir'] . '/includes/pager.class.php');
    include_once($config['app_dir'] . '/includes/session.class.php');
    include_once($config['app_dir'] . '/includes/FormParams.class.php');
    include_once($config['app_dir'] . '/classes/admins/const/language.const.php');
    include_once($config['app_dir'] . '/classes/admins/sql/language.sql.php');
    require_once($config['app_dir'] . '/classes/staff.class.php');

    $Staff = new objStaff($config['app_id']);
    if( 3!=$Staff->UserGroupID() ) die('You have not permission to see this page. ');//var_dump($Staff->UserGroupID());
    //-----------------------------------------------------------------------------------------------------------------------
    // delete record
    //-------------------------------------------------------------------------------------------------------
    $DataBase = objDataBase::GetInstance();
    $ParamsDelete = new objFormParams('get', 'language_');
    if( !$ParamsDelete->isEmpty() && $params_delete = $ParamsDelete->getAssocArray() )
        if( 'delete' == $params_delete['operation']) {
            $DataBase->Execute('DELETE FROM fa_language WHERE id=' . $params_delete['id']);//XXX db
    }
    //-------------------------------------------------------------------------------------------------------
    // Pager
    //-------------------------------------------------------------------------------------------------------
    $Pager = new objRsGridPager($LangColumnSet, $language_query_main, $language_query_count, 'language');//XXX db
    $Pager->rows_steps = array(20);
    $Pager->edit_script ='language.php';
    $Pager->new_script ='language.php';
    $Pager->delete_script ='languages.php';
    $Pager->setTitle($LangColumnSet->title);
    //---------------------------------------------------------------------------------

    $Page = new objTemplate();
    $Page->Assign('content', $Pager->Render('admins/lang/grid_simple.tpl'));
	$Page->Display('admins/lang/page_lang.tpl');
//---------------------------------------------------------------------------------------------------------------------------
?>
